﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Assignment2.Conditions;
using Assignment2.States;

namespace Assignment2.Transitions
{
    class ToDeadTransition : Transition
    {
        public ToDeadTransition(ref Integer boringValue, ref Integer hungryValue, ref Integer toyValue, ref Integer foodValue, ref Integer idleTime)
            : base()
        {
            Condition starve = new IsGreaterThanOrEqualCondition(hungryValue, new Integer(3600));
            Condition bored = new IsGreaterThanOrEqualCondition(boringValue, new Integer(7200));
            condition = new OrCondition(starve, bored);
        }

        public override void updateMember()
        {
            targetState = StateAndTransitionPool.Dead;
        }
    }
}
